package com.xyx.bloodoxygenlib.impls;

import android.os.Handler;

public class BaseThread extends Thread {
    protected Handler mHandler;
    protected volatile boolean stop = false;
    protected volatile boolean pause = false;

    public void Stop() {
        this.stop = true;
    }

    public void Pause() {
        this.pause = true;
    }

    @Override // java.lang.Thread
    public synchronized void start() {
        this.stop = false;
        super.start();
    }

    public synchronized void Continue() {
        this.pause = false;
        notify();
    }

    public void setHandler(Handler _handler) {
        this.mHandler = _handler;
    }
}
